assume cs:code
a segment
dw 1,2,3,4,5,6,7,8,9,0ah,0bh,0ch,0dh,0eh,0fh,0ffh
a ends
b segment
dw 0,0,0,0,0,0,0,0
b ends
code segment
start:
mov ax, a
mov ds, ax
mov ax, b
mov es, ax
mov cx, 0010h
mov si, 0
mov di, 0
s1:
mov ax, word ptr ds:[si]
push ax
add si, 2
loop s1
mov cx, 0010h
s2:
pop ax
mov word ptr es:[di], ax
add di, 2
loop s2
mov ax, 4c00h
int 21h
code ends
end start